package com.simen.hellobytes.android;

import android.app.Activity;
import android.os.Build;

/**
 * @author Created by SimenHi.
 * @date 创建日期 2019/1/10 10:13
 * @modify 修改者 SimenHi
 */
public class ActivityUtil {

    public static boolean isActivityFinished(Activity activity){
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            if (activity.isDestroyed()) {
                return true;
            }
        }

        if(activity.isFinishing()){
            return true;
        }

        return false;
    }

}
